//
//  ResponseSerializer.m
//  Basic
//
//  Created by 裴烨烽 on 16/5/23.
//  Copyright © 2016年 BasicPod. All rights reserved.
//

#import "ResponseSerializer.h"

@implementation ResponseSerializer

-(instancetype)responseObjectForResponse:(NSURLResponse *)response data:(NSData *)data error:(NSError *__autoreleasing  _Nullable *)error{
    NSString *string = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
    if (string && [response.MIMEType isEqualToString:@"application/json"]) {
        NSLog(@"the response is: %@", response);
        NSLog(@"got response string: %@", string);
        NSLog(@"the response is: %@", response);
        NSLog(@"got response string: %@", string);
    }
    else {
        NSLog(@"ERROR: can not parse response string");
    }
    return [super responseObjectForResponse:response data:data error:error];
}

@end
